package com.restaurant.springboot.entity.dto;

import java.util.Objects;

public class CommentDTO {

    private String content;

    private int orderId;

    private int userId;

    public CommentDTO() {
    }

    public CommentDTO(String content, int orderId, int userId) {
        this.content = content;
        this.orderId = orderId;
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CommentDTO commentDTO = (CommentDTO) o;
        return orderId == commentDTO.orderId &&
                userId == commentDTO.userId &&
                Objects.equals(content, commentDTO.content);
    }

    @Override
    public int hashCode() {
        return Objects.hash(content, orderId, userId);
    }
}
